import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    // msg: sessionStorage.getItem('msg) ||"",
    msg: "",
  },
  getters: {},
  mutations: {
    SET_MSG: (state, paylod) => {
      // 可以选择将信息保存到本地存储
      // sessionStorage.setItem("msg", paylod);
      state.msg = paylod;
    },
  },
  actions: {},
  modules: {},
});
